package com.autonavi.yunda.yunji.controller.response;

import com.autonavi.yunda.yunji.core.engine.script.InterfaceScriptClass;

import java.sql.Timestamp;

/**
 * @author cizhong.wcs
 * @date 2022/7/19 20:50
 */
public class ScriptResponse {
    public Long interfaceId;
    /**
     * 脚本数据库的更新时间
     */
    public Timestamp updateTime;
    /**
     * 该脚本实例创建时间
     */
    public String scriptCreateTime;

    public static ScriptResponse fromScriptClass(InterfaceScriptClass scriptClass) {
        ScriptResponse response = new ScriptResponse();
        response.interfaceId = scriptClass.interfaceId;
        response.updateTime = scriptClass.updateTime;
        response.scriptCreateTime = scriptClass.scriptCreateTime;
        return response;
    }
}
